# Maintainer: David Runge <dvzrv@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Axel Hinrichs <hinrichs@bitscape.de>

pkgname=catatonit
pkgver=0.1.7
pkgrel=2
pkgdesc="A container init that is so simple it's effectively brain-dead."
arch=(loong64 x86_64)
url="https://github.com/openSUSE/catatonit/"
license=(GPL3)
options=(debug)
source=(
  $pkgname-$pkgver.tar.xz::https://github.com/openSUSE/catatonit/releases/download/v$pkgver/$pkgname.tar.xz
  $pkgname-$pkgver.tar.xz.asc::https://github.com/openSUSE/catatonit/releases/download/v$pkgver/$pkgname.tar.xz.asc
  $pkgname-0.1.7-autoconf.patch::https://github.com/openSUSE/catatonit/commit/99bb9048f532257f3a2c3856cfa19fe957ab6cec.patch
)
sha256sums=('6ea6cb8c7feeca2cf101e7f794dab6eeb192cde177ecc7714d2939655d3d8997'
            'SKIP'
            '93e0429aa58cecea6cf2a8727bcc53e6eca90da63305a24c4f826b5e31c90d1a')
b2sums=('8e63022bb76e37d1332403c1a96c851e1262ae405327747b6e2e1576b128f24499acface264c51131a074de992b8437a12e0261b72a6937d08db99e0ed5a3221'
        'SKIP'
        '72b3fcbab94276e77b98b21bd000a6142594287f7c5a732a45b69e8e8d46cfe5b6d1157c8fc675e94ebf240c1dc7e171b228c0afbb01753b154b4f733cff90e4')
validpgpkeys=('5F36C6C61B5460124A75F5A69E18AA267DDB8DB4')  # Aleksa Sarai <asarai@suse.com>

prepare(){
  cd $pkgname-$pkgver
  patch -Np1 -i ../$pkgname-0.1.7-autoconf.patch
  autoreconf -fiv
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make V=1
}

package() {
  make PREFIX=/usr DESTDIR="$pkgdir" install -C $pkgname-$pkgver
  install -vdm 755 "$pkgdir/usr/lib/podman/"
  ln -sv /usr/bin/$pkgname "$pkgdir/usr/lib/podman/"
}

# vim: ft=sh syn=sh
